C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
 
 
 
 
 
 
 
 
C                                   parameter length
 
 
 
 
 
 
 
 
 
C following are for ZYCSDT (Canonicalise Symbol Data Types)
C ----------------------------------------------------------------------
C
C       Y D T Y P E   -   Output token stream for a data type
C
 
        SUBROUTINE YDTYPE(DTYPE,CHRLEN,TKDESC)
        INTEGER DTYPE,CHRLEN,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        INTEGER DUMMY(2)
 
        EXTERNAL ZTOKWR,ERROR
 
        DATA DUMMY(1)/129/
 
        IF (DTYPE.EQ.1) THEN
            CALL ZTOKWR(TINTEG,0,DUMMY,TKDESC)
        ELSE IF (DTYPE.EQ.2) THEN
            CALL ZTOKWR(TREAL,0,DUMMY,TKDESC)
        ELSE IF (DTYPE.EQ.5) THEN
            CALL ZTOKWR(TDOUBL,0,DUMMY,TKDESC)
        ELSE IF (DTYPE.EQ.4) THEN
            CALL ZTOKWR(TCOMPL,0,DUMMY,TKDESC)
        ELSE IF (DTYPE.EQ.3) THEN
            CALL ZTOKWR(TLOGIC,0,DUMMY,TKDESC)
        ELSE IF (DTYPE.EQ.6) THEN
            CALL ZTOKWR(TCHARA,0,DUMMY,TKDESC)
        ELSE IF (DTYPE.EQ.7) THEN
            CALL ZTOKWR(TDCMPL,0,DUMMY,TKDESC)
        ELSE
            CALL ERROR('Invalid arguments to YDTYPE')
        END IF
        IF (CHRLEN.NE.0) CALL YCHLEN(CHRLEN,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       Y L E A F   -   Output the token for a leaf node
C                       Leaf nodes are: all names and constants,
C                                       and the "asterisk" node.
C
 
        SUBROUTINE YLEAF(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCSYMS/MODFLG,NSYMS,NPUS,PUIDX,SYMBOL
        INTEGER NSYMS,NPUS,PUIDX(250),
     +          SYMBOL(8,5003)
        LOGICAL MODFLG
 
        SAVE /XCSYMS/
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCSTRI/STRTXT,STRTBL,NSTRNG,TXTTOP
        INTEGER STRTXT(46339),STRTBL(7103),NSTRNG,TXTTOP
 
        SAVE /XCSTRI/
 
 
        SAVE ERRTXT,ENDTXT
 
        INTEGER TEXT(1322),TOKTYP,NODTYP,ERRTXT(4),ENDTXT(4),
     +          TXTPTR
 
        INTEGER LENGTH,EQUAL
        EXTERNAL LENGTH,ZTOKWR,ERROR,ZPTINT,ZCHOUT,EQUAL,ZTOCAP,SCOPY,
     +           ZMESS
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA ERRTXT/69,82,82,129/,ENDTXT/69,78,68,129/
 
        NODTYP=NTYPE(NODE)
        IF (NODTYP.EQ.108 .OR. NODTYP.EQ.115 .OR.
     +      NODTYP.EQ.116 .OR. NODTYP.EQ.40) THEN
            TEXT(1)=129
            IF (NODTYP.EQ.40)
     +          CALL ZTOKWR(TSLASH,0,TEXT,TKDESC)
            TXTPTR=SYMBOL(2,-DOWN(NODE))
            IF (NODTYP.EQ.108 .OR. NODTYP.EQ.40) THEN
                TOKTYP=TNAME
            ELSE
                TOKTYP=TDCNST
            END IF
        ELSE IF (NODTYP.EQ.17) THEN
            TOKTYP=TSTAR
            TEXT(1)=129
            TXTPTR=0
        ELSE
            TXTPTR=-DOWN(NODE)
            IF (NODTYP.EQ.107) THEN
                TOKTYP=TDCNST
            ELSE IF (NODTYP.EQ.110) THEN
                TOKTYP=TRCNST
            ELSE IF (NODTYP.EQ.111) THEN
                TOKTYP=TPCNST
            ELSE IF (NODTYP.EQ.109) THEN
                TOKTYP=TLCNST
            ELSE IF (NODTYP.EQ.114) THEN
                TOKTYP=TCCNST
            ELSE IF (NODTYP.EQ.113) THEN
                TOKTYP=THCNST
            ELSE IF (NODTYP.EQ.120) THEN
                TOKTYP=TNAME
            ELSE IF (NODTYP.EQ.118) THEN
                CALL SCOPY(STRTXT,TXTPTR,TEXT,1)
                CALL ZTOCAP(TEXT)
                IF (EQUAL(TEXT,ENDTXT).EQ.-2) THEN
                    TOKTYP=TENDKD
                ELSE IF (EQUAL(TEXT,ERRTXT).EQ.-2) THEN
                    TOKTYP=TERRKD
                ELSE
                    TOKTYP=TNAME
                END IF
            ELSE
                CALL ZCHOUT('YLEAF: Invalid leaf node (Number ',2)
                CALL ZPTINT(NODE,1,2)
                CALL ZCHOUT(',type ',2)
                CALL ZPTINT(NODTYP,1,2)
                CALL ZMESS(')',2)
                CALL ERROR('PROGRAM ABORTED')
            END IF
        END IF
        IF (TXTPTR.NE.0) THEN
            CALL ZTOKWR(TOKTYP,LENGTH(STRTXT(TXTPTR)),STRTXT(TXTPTR),
     +                  TKDESC)
        ELSE
            CALL ZTOKWR(TOKTYP,LENGTH(TEXT),TEXT,TKDESC)
        END IF
        IF (NODTYP.EQ.40) THEN
            TEXT(1)=129
            CALL ZTOKWR(TSLASH,0,TEXT,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       Y A R E L M   -   Output token stream for an array_element_name
C
 
        SUBROUTINE YARELM(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        INTEGER PTR,DUMMY(2)
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        PTR=DOWN(NODE)
        CALL YLEAF(PTR,TKDESC)
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        PTR=NEXT(PTR)
 
 100    CALL YEXPR(PTR,TKDESC)
        PTR=NEXT(PTR)
        IF (PTR.GT.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GOTO 100
        END IF
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       Y S U B S T   -   Output token stream for a substring_name
C
 
        SUBROUTINE YSUBST(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        INTEGER PTR,DUMMY(2)
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        PTR=DOWN(NODE)
        IF (NTYPE(PTR).EQ.108) THEN
            CALL YLEAF(PTR,TKDESC)
        ELSE
            CALL YARELM(PTR,TKDESC)
        END IF
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        PTR=DOWN(NEXT(PTR))
        IF (NTYPE(PTR).NE.106) THEN
            CALL YEXPR(PTR,TKDESC)
        END IF
        CALL ZTOKWR(TCOLON,0,DUMMY,TKDESC)
        PTR=NEXT(PTR)
        IF (NTYPE(PTR).NE.106) THEN
            CALL YEXPR(PTR,TKDESC)
        END IF
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       Y A R D C L   -   Output token stream for an array_declarator
C                         (when the name has already been output -
C                          so we should be passed the first array
C                          dimension).
C
 
        SUBROUTINE YARDCL(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        INTEGER PTR,PTR2,DUMMY(2)
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        PTR=NODE
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
 
C Loop Invariant: PTR -> a N_ARDIM node (and zero at end)
 
 100    IF (NTYPE(PTR).EQ.23) THEN
          PTR2=DOWN(PTR)
          IF (PTR2.EQ.0) THEN
            CALL ZTOKWR(TSTAR,0,DUMMY,TKDESC)
          ELSE
C Output lower dimension  expression
            CALL YEXPR(PTR2,TKDESC)
            CALL ZTOKWR(TCOLON,0,DUMMY,TKDESC)
C Upper dimension is *
            CALL ZTOKWR(TSTAR,0,DUMMY,TKDESC)
          ENDIF
        ELSE
C Output 1st of array dimension bounds
            PTR2=DOWN(PTR)
            CALL YEXPR(PTR2,TKDESC)
            PTR2=NEXT(PTR2)
C Output 2nd if any
            IF (PTR2.NE.0) THEN
                CALL ZTOKWR(TCOLON,0,DUMMY,TKDESC)
                CALL YEXPR(PTR2,TKDESC)
            END IF
        END IF
C Advance to next array dimension
        PTR=NEXT(PTR)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GOTO 100
        END IF
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       Y C H L E N   -   Output a len_specification
C
 
        SUBROUTINE YCHLEN(CHRLEN,TKDESC)
        INTEGER CHRLEN,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        INTEGER DUMMY(2),STRING(12),LGTH
 
        INTEGER ITOC
        EXTERNAL ZTOKWR,ITOC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TSTAR,0,DUMMY,TKDESC)
        IF (CHRLEN.GT.0) THEN
            LGTH=ITOC(CHRLEN,STRING,11)
            CALL ZTOKWR(TDCNST,LGTH,STRING,TKDESC)
        ELSE IF (NTYPE(-CHRLEN).EQ.17) THEN
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            CALL ZTOKWR(TSTAR,0,DUMMY,TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        ELSE
            CALL YEXPR(-CHRLEN,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       Y E X P R   -   Output an expression
C
 
        SUBROUTINE YEXPR(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        INTEGER PTR,DUMMY(2),UPX,DOWNX,NODTYP,NEXTX,UPTYPE
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        PTR=NODE
 
C
C Going down
C
 100    DOWNX=DOWN(PTR)
        NODTYP=NTYPE(PTR)
        IF (DOWNX.LE.0) THEN
            IF (NODTYP.NE.106) CALL YLEAF(PTR,TKDESC)
            GOTO 1000
        END IF
        IF (NODTYP.EQ.97) THEN
            CALL ZTOKWR(TPLUS,0,DUMMY,TKDESC)
        ELSE IF (NODTYP.EQ.46) THEN
            CALL ZTOKWR(TMINUS,0,DUMMY,TKDESC)
        ELSE IF (NODTYP.EQ.101 .OR. NODTYP.EQ.102) THEN
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        ELSE IF (NODTYP.EQ.88) THEN
            CALL ZTOKWR(TNOT,0,DUMMY,TKDESC)
        END IF
        PTR=DOWNX
        GOTO 100
C
C Going up (or next if this isn't the last)
C
 1000   IF (PTR.EQ.NODE) RETURN
        UPX=UP(PTR)
        UPTYPE=NTYPE(UPX)
        IF (UPTYPE.EQ.101) THEN
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            PTR=UPX
            GOTO 1000
        ELSE IF (UPTYPE.EQ.97 .OR. UPTYPE.EQ.46 .OR.
     +           UPTYPE.EQ.88) THEN
            PTR=UPX
            GOTO 1000
        END IF
        NEXTX=NEXT(PTR)
        IF (NEXTX.EQ.0) THEN
            IF (UPTYPE.EQ.119 .OR. UPTYPE.EQ.104 .OR.
     +          UPTYPE.EQ.102 .OR. UPTYPE.EQ.105) THEN
C Check for special case of no list (N_FUNREF only)
                IF (DOWN(UPX).EQ.PTR)
     +              CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
                CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            END IF
            PTR=UPX
            GOTO 1000
        END IF
C NEXTX.NE.0
        IF (UPTYPE.EQ.95) THEN
            CALL ZTOKWR(TPLUS,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.96) THEN
            CALL ZTOKWR(TMINUS,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.98) THEN
            CALL ZTOKWR(TSTAR,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.99) THEN
            CALL ZTOKWR(TSLASH,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.100) THEN
            CALL ZTOKWR(TDSTAR,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.102) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.84) THEN
            CALL ZTOKWR(TEQV,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.85) THEN
            CALL ZTOKWR(TNEQV,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.87) THEN
            CALL ZTOKWR(TAND,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.86) THEN
            CALL ZTOKWR(TOR,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.70) THEN
            CALL ZTOKWR(TCNCAT,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.90) THEN
            CALL ZTOKWR(TLE,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.89) THEN
            CALL ZTOKWR(TLT,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.93) THEN
            CALL ZTOKWR(TGT,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.94) THEN
            CALL ZTOKWR(TGE,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.91) THEN
            CALL ZTOKWR(TEQ,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.92) THEN
            CALL ZTOKWR(TNE,0,DUMMY,TKDESC)
        ELSE IF (UPTYPE.EQ.105) THEN
            CALL ZTOKWR(TCOLON,0,DUMMY,TKDESC)
        ELSE
C Must be N_ARELM or N_FUNREF or N_SUBSTR
            IF (DOWN(UPX).EQ.PTR) THEN
                CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            ELSE
                CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            END IF
        END IF
        PTR=NEXTX
        GOTO 100
 
        END
C ----------------------------------------------------------------------
C
C       Y S T M T   -   Output a statement
C
 
        SUBROUTINE YSTMT(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER STYPE,PTR,DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLIST,YLEAF,YITEM,ERROR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        PTR=NODE
 100    STYPE=NTYPE(PTR)
        PTR=DOWN(PTR)
        IF (PTR.NE.0) THEN
            IF (NTYPE(PTR).EQ.115) THEN
                CALL YLEAF(PTR,TKDESC)
                PTR=NEXT(PTR)
            END IF
        END IF
 
        IF (STYPE.EQ.35) THEN
            CALL XYPARA(PTR,TKDESC)
        ELSE IF (STYPE.EQ.82) THEN
            CALL XYCALL(PTR,TKDESC)
        ELSE IF (STYPE.EQ.83) THEN
            CALL XYRETU(PTR,TKDESC)
        ELSE IF (STYPE.EQ.78) THEN
            CALL XYFRMT(PTR,TKDESC)
        ELSE IF (STYPE.EQ.20) THEN
            CALL ZTOKWR(TDIMEN,0,DUMMY,TKDESC)
            CALL YLIST(YITEM,PTR,TKDESC)
        ELSE IF (STYPE.EQ.26) THEN
            CALL XYCMMN(PTR,TKDESC)
        ELSE IF (STYPE.EQ.24) THEN
            CALL XYEQVL(PTR,TKDESC)
        ELSE IF (STYPE.EQ.30) THEN
            CALL YTYPE(PTR,TKDESC)
            CALL YLIST(YITEM,NEXT(PTR),TKDESC)
        ELSE IF (STYPE.EQ.61) THEN
            CALL XYDO(PTR,TKDESC)
        ELSE IF (STYPE.EQ.49) THEN
            CALL XYASGN(PTR,TKDESC)
        ELSE IF (STYPE.EQ.32) THEN
            CALL XYIMPL(PTR,TKDESC)
        ELSE IF (STYPE.EQ.37) THEN
            CALL ZTOKWR(TEXTER,0,DUMMY,TKDESC)
            CALL YLIST(YLEAF,PTR,TKDESC)
        ELSE IF (STYPE.EQ.38) THEN
            CALL ZTOKWR(TINTRI,0,DUMMY,TKDESC)
            CALL YLIST(YLEAF,PTR,TKDESC)
        ELSE IF (STYPE.EQ.39) THEN
            CALL ZTOKWR(TSAVE,0,DUMMY,TKDESC)
            IF (PTR.NE.0) CALL YLIST(YLEAF,PTR,TKDESC)
        ELSE IF (STYPE.EQ.41) THEN
            CALL XYDATA(PTR,TKDESC)
        ELSE IF (STYPE.EQ.51) THEN
            CALL ZTOKWR(TGOTO,0,DUMMY,TKDESC)
            CALL YLEAF(PTR,TKDESC)
        ELSE IF (STYPE.EQ.52) THEN
            CALL XYCMGO(PTR,TKDESC)
        ELSE IF (STYPE.EQ.53) THEN
            CALL XYASGO(PTR,TKDESC)
        ELSE IF (STYPE.EQ.57 .OR. STYPE.EQ.55 .OR.
     +           STYPE.EQ.58) THEN
            CALL XYIF(PTR,TKDESC)
        ELSE IF (STYPE.EQ.56) THEN
            CALL ZTOKWR(TIF,0,DUMMY,TKDESC)
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            CALL YEXPR(PTR,TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            PTR=NEXT(PTR)
            GO TO 100
        ELSE IF (STYPE.EQ.60) THEN
            CALL ZTOKWR(TENDIF,0,DUMMY,TKDESC)
        ELSE IF (STYPE.EQ.62) THEN
            CALL ZTOKWR(TCONTI,0,DUMMY,TKDESC)
        ELSE IF (STYPE.EQ.6) THEN
            CALL ZTOKWR(TEND,0,DUMMY,TKDESC)
        ELSE
            GO TO 2000
        ENDIF
        GO TO 1000
C
C  AVOID IBM LIMIT ON ELSE-IF BLOCKS
C
 2000   CONTINUE
        IF (STYPE.EQ.59) THEN
            CALL ZTOKWR(TELSE,0,DUMMY,TKDESC)
        ELSE IF (STYPE.EQ.63) THEN
            CALL ZTOKWR(TSTOP,0,DUMMY,TKDESC)
            IF (PTR.NE.0) CALL YLEAF(PTR,TKDESC)
        ELSE IF (STYPE.EQ.64) THEN
            CALL ZTOKWR(TPAUSE,0,DUMMY,TKDESC)
            IF (PTR.NE.0) CALL YLEAF(PTR,TKDESC)
        ELSE IF (STYPE.EQ.65) THEN
            CALL XYWRIT(PTR,TKDESC)
        ELSE IF (STYPE.EQ.67) THEN
            CALL XYPRIN(PTR,TKDESC)
        ELSE IF (STYPE.EQ.66) THEN
            CALL XYREAD(PTR,TKDESC)
        ELSE IF (STYPE.EQ.75 .OR. STYPE.EQ.76 .OR.
     +           STYPE.EQ.77 .OR. STYPE.EQ.72 .OR.
     +           STYPE.EQ.73 .OR. STYPE.EQ.74) THEN
            CALL XYAUX(PTR,TKDESC)
        ELSE IF (STYPE.EQ.7) THEN
            CALL ZTOKWR(TPROGR,0,DUMMY,TKDESC)
            CALL YLEAF(PTR,TKDESC)
        ELSE IF (STYPE.EQ.16) THEN
            CALL XYSUBR(PTR,TKDESC)
        ELSE IF (STYPE.EQ.8) THEN
            CALL XYFUNC(PTR,TKDESC)
        ELSE IF (STYPE.EQ.19) THEN
            CALL ZTOKWR(TBLOCK,0,DUMMY,TKDESC)
            IF (PTR.NE.0) CALL YLEAF(PTR,TKDESC)
        ELSE IF (STYPE.EQ.6) THEN
            CALL ZTOKWR(TEND,0,DUMMY,TKDESC)
        ELSE IF (STYPE.EQ.121) THEN
            CALL YLEAF(PTR,TKDESC)
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            PTR=NEXT(PTR)
            CALL YLIST(YLEAF,DOWN(PTR),TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            CALL ZTOKWR(TEQUAL,0,DUMMY,TKDESC)
            CALL YEXPR(NEXT(PTR),TKDESC)
        ELSE IF (STYPE.EQ.18) THEN
            CALL ZTOKWR(TENTRY,0,DUMMY,TKDESC)
            CALL YLEAF(PTR,TKDESC)
            PTR=NEXT(PTR)
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            IF (PTR.NE.0) CALL YLIST(YLEAF,DOWN(PTR),TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        ELSE IF (STYPE.EQ.50) THEN
            CALL XYASSI(PTR,TKDESC)
        ELSE IF (STYPE.EQ.131 .OR. STYPE.EQ.132) THEN
            RETURN
        ELSE
            CALL ERROR('YSTMT: Don''t understand statement type')
        END IF
 
 1000   CONTINUE
        CALL ZTOKWR(TZEOS,0,DUMMY,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       Y I T E M   -   Output leaf/ardcl/arelm/substr
C
 
        SUBROUTINE YITEM(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER NODTYP,PTR
        LOGICAL CHARA
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        NODTYP=NTYPE(NODE)
        IF (NODTYP.EQ.31) THEN
            CHARA=.TRUE.
            PTR=DOWN(NODE)
            NODTYP=NTYPE(PTR)
        ELSE
            CHARA=.FALSE.
            PTR=NODE
        END IF
        IF (NODTYP.EQ.103) THEN
            CALL YSUBST(PTR,TKDESC)
        ELSE IF (NODTYP.EQ.104) THEN
            CALL YARELM(PTR,TKDESC)
        ELSE IF (NODTYP.EQ.21) THEN
            CALL YLEAF(DOWN(PTR),TKDESC)
            CALL YARDCL(NEXT(DOWN(PTR)),TKDESC)
        ELSE
            CALL YLEAF(PTR,TKDESC)
        END IF
        IF (CHARA) CALL YCHLEN(-NEXT(PTR),TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       Y L I S T   -   Output a list separated by commas
C
 
        SUBROUTINE YLIST(SUBR,NODE,TKDESC)
        INTEGER NODE,TKDESC
        EXTERNAL SUBR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER PTR,DUMMY(2)
 
        EXTERNAL ZTOKWR
 
        SAVE DUMMY
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        PTR=NODE
 
 100    CALL SUBR(PTR,TKDESC)
        PTR=NEXT(PTR)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GO TO 100
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       Y T Y P E   -   Output a data type (from a node pointer)
C
 
        SUBROUTINE YTYPE(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER NODTYP,DUMMY(2),TOKTYP
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,ERROR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        NODTYP=NTYPE(NODE)
        IF (NODTYP.EQ.9) THEN
            TOKTYP=TINTEG
        ELSE IF (NODTYP.EQ.10) THEN
            TOKTYP=TREAL
        ELSE IF (NODTYP.EQ.13) THEN
            TOKTYP=TLOGIC
        ELSE IF (NODTYP.EQ.12) THEN
            TOKTYP=TCOMPL
        ELSE IF (NODTYP.EQ.11) THEN
            TOKTYP=TDOUBL
        ELSE IF (NODTYP.EQ.14) THEN
            TOKTYP=TCHARA
        ELSE IF (NODTYP.EQ.125) THEN
            TOKTYP=TDCMPL
        ELSE
            CALL ERROR('YTYPE: Invalid type node')
        END IF
        CALL ZTOKWR(TOKTYP,0,DUMMY,TKDESC)
        IF (DOWN(NODE).NE.0) CALL YCHLEN(-DOWN(NODE),TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y P A R A   -   Output a Parameter Statement
C
 
        SUBROUTINE XYPARA(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCSYMS/MODFLG,NSYMS,NPUS,PUIDX,SYMBOL
        INTEGER NSYMS,NPUS,PUIDX(250),
     +          SYMBOL(8,5003)
        LOGICAL MODFLG
 
        SAVE /XCSYMS/
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCSTRI/STRTXT,STRTBL,NSTRNG,TXTTOP
        INTEGER STRTXT(46339),STRTBL(7103),NSTRNG,TXTTOP
 
        SAVE /XCSTRI/
 
 
        SAVE DUMMY
 
        INTEGER PTR,DUMMY(2),TXTPTR
 
        INTEGER LENGTH
        EXTERNAL LENGTH,ZTOKWR,YEXPR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TPARAM,0,DUMMY,TKDESC)
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        PTR=NODE
 
 100    TXTPTR=SYMBOL(2,-DOWN(DOWN(PTR)))
        CALL ZTOKWR(TNAME,LENGTH(STRTXT(TXTPTR)),STRTXT(TXTPTR),TKDESC)
        CALL ZTOKWR(TEQUAL,0,DUMMY,TKDESC)
        CALL YEXPR(NEXT(DOWN(PTR)),TKDESC)
        PTR=NEXT(PTR)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GOTO 100
        END IF
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y C A L L   -   Output a CALL statement
C
 
        SUBROUTINE XYCALL(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER PTR,DUMMY(2)
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TCALL,0,DUMMY,TKDESC)
        CALL YLEAF(NODE,TKDESC)
        PTR=NEXT(NODE)
        IF (PTR.EQ.0) RETURN
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
 
 100    IF (NTYPE(PTR).EQ.116) THEN
            CALL ZTOKWR(TSTAR,0,DUMMY,TKDESC)
            CALL YLEAF(PTR,TKDESC)
        ELSE
            CALL YEXPR(PTR,TKDESC)
        END IF
        PTR=NEXT(PTR)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GO TO 100
        END IF
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y R E T U   -   Output a RETURN statement
C
 
        SUBROUTINE XYRETU(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TRETUR,0,DUMMY,TKDESC)
        IF (NODE.NE.0) CALL YEXPR(NODE,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y F R M T   -   Output a FORMAT statement
C
 
        SUBROUTINE XYFRMT(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER PTR,NEXTX,NODTYP,TXTPTR,DUMMY(2),TOKTYP,ENDING
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCSTRI/STRTXT,STRTBL,NSTRNG,TXTTOP
        INTEGER STRTXT(46339),STRTBL(7103),NSTRNG,TXTTOP
 
        SAVE /XCSTRI/
 
 
        SAVE DUMMY
 
        INTEGER LENGTH
        EXTERNAL LENGTH,ZTOKWR,ERROR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TFORMA,0,DUMMY,TKDESC)
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        IF (NODE.EQ.0) THEN
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            RETURN
        END IF
        PTR=NODE
        ENDING=UP(NODE)
 
 100    NODTYP=NTYPE(PTR)
        IF (NODTYP.EQ.117) THEN
            PTR=DOWN(PTR)
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            GO TO 100
        ELSE IF (NODTYP.EQ.79) THEN
            PTR=DOWN(PTR)
            GO TO 100
        ELSE IF (NODTYP.EQ.80) THEN
            CALL ZTOKWR(TSLASH,0,DUMMY,TKDESC)
        ELSE IF (NODTYP.EQ.81) THEN
            CALL ZTOKWR(TCOLON,0,DUMMY,TKDESC)
        ELSE
            TXTPTR=-DOWN(PTR)
            IF (NODTYP.EQ.112) THEN
                TOKTYP=TFIELD
            ELSE IF (NODTYP.EQ.126) THEN
                TOKTYP=TSCALE
            ELSE IF (NODTYP.EQ.114) THEN
                TOKTYP=TCCNST
            ELSE IF (NODTYP.EQ.113) THEN
                TOKTYP=THCNST
            ELSE IF (NODTYP.EQ.107) THEN
                TOKTYP=TDCNST
            ELSE
                CALL ERROR('XYFRMT: Invalid node type')
            END IF
            CALL ZTOKWR(TOKTYP,LENGTH(STRTXT(TXTPTR)),STRTXT(TXTPTR),
     +                  TKDESC)
        END IF
 
 200    NEXTX=NEXT(PTR)
        IF (NEXTX.NE.0) THEN
            PTR=NEXTX
            IF (NODTYP.NE.107)
     +          CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GO TO 100
        END IF
        PTR=UP(PTR)
        IF (PTR.EQ.ENDING) THEN
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            RETURN
        END IF
        IF (NTYPE(PTR).EQ.117)
     +      CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        GO TO 200
 
        END
C ----------------------------------------------------------------------
C
C       X Y E Q V L   -   Output an EQUIVALENCE statement
C
 
        SUBROUTINE XYEQVL(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER PTR,DUMMY(2)
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLIST,YITEM
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TEQUIV,0,DUMMY,TKDESC)
        PTR=NODE
 
 100    CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        CALL YLIST(YITEM,DOWN(PTR),TKDESC)
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        PTR=NEXT(PTR)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GO TO 100
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y C M M N   -   Output a COMMON statement
C
 
        SUBROUTINE XYCMMN(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER PTR,DUMMY(2),P2
 
        EXTERNAL YLIST,YITEM,ZTOKWR
 
        SAVE DUMMY
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TCOMMO,0,DUMMY,TKDESC)
        PTR=NODE
 
 100    P2=DOWN(PTR)
        IF (NTYPE(PTR).EQ.28) THEN
            CALL YLEAF(P2,TKDESC)
            CALL YLIST(YITEM,DOWN(NEXT(P2)),TKDESC)
        ELSE
            IF (PTR.NE.NODE) CALL ZTOKWR(TCNCAT,0,DUMMY,TKDESC)
            CALL YLIST(YITEM,DOWN(P2),TKDESC)
        END IF
        PTR=NEXT(PTR)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GO TO 100
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y A S G N   -   Output an assignment statement
C
 
        SUBROUTINE XYASGN(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YITEM,YEXPR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL YITEM(NODE,TKDESC)
        CALL ZTOKWR(TEQUAL,0,DUMMY,TKDESC)
        CALL YEXPR(NEXT(NODE),TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y D O S P   -   Output a DO specification
C
 
        SUBROUTINE XYDOSP(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER PTR,DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLEAF,YEXPR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        PTR=DOWN(NODE)
        CALL YLEAF(PTR,TKDESC)
        CALL ZTOKWR(TEQUAL,0,DUMMY,TKDESC)
        PTR=NEXT(PTR)
        CALL YEXPR(PTR,TKDESC)
        PTR=NEXT(PTR)
        CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
        CALL YEXPR(PTR,TKDESC)
        PTR=NEXT(PTR)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            CALL YEXPR(PTR,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y D O   -   Output a DO statement
C
 
        SUBROUTINE XYDO(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2)
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLEAF
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TDO,0,DUMMY,TKDESC)
        CALL YLEAF(NODE,TKDESC)
        CALL XYDOSP(NEXT(NODE),TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y I M P L   -   Output an IMPLICIT statement
C
 
        SUBROUTINE XYIMPL(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER PTR1,PTR2,PTR3,DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        PTR1=NODE
        CALL ZTOKWR(TIMPLI,0,DUMMY,TKDESC)
 
 100    PTR2=DOWN(PTR1)
        CALL YTYPE(PTR2,TKDESC)
        PTR2=NEXT(PTR2)
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
 
 200    PTR3=DOWN(PTR2)
        CALL YLEAF(PTR3,TKDESC)
        PTR3=NEXT(PTR3)
        IF (PTR3.NE.0) THEN
            CALL ZTOKWR(TMINUS,0,DUMMY,TKDESC)
            CALL YLEAF(PTR3,TKDESC)
        END IF
        PTR2=NEXT(PTR2)
        IF (PTR2.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GO TO 200
        END IF
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        PTR1=NEXT(PTR1)
        IF (PTR1.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GO TO 100
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y D A T A   -   Output a DATA statement
C
 
        SUBROUTINE XYDATA(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER PTR,DUMMY(2),P2
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL YLIST,XYDATI,XYDATO,ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TDATA,0,DUMMY,TKDESC)
        PTR=NODE
 
 100    P2=DOWN(PTR)
        CALL YLIST(XYDATI,DOWN(P2),TKDESC)
        CALL ZTOKWR(TSLASH,0,DUMMY,TKDESC)
        CALL YLIST(XYDATO,DOWN(NEXT(P2)),TKDESC)
        CALL ZTOKWR(TSLASH,0,DUMMY,TKDESC)
        PTR=NEXT(PTR)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            GO TO 100
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y D A T I   -   Called by XYDATA via YLIST
C
 
        SUBROUTINE XYDATI(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER PTR,DUMMY(2),NODTYP
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        IF (NTYPE(NODE).NE.47) THEN
            CALL YITEM(NODE,TKDESC)
            RETURN
        END IF
        PTR=NODE
 
 100    NODTYP=NTYPE(PTR)
        IF (NODTYP.EQ.47) THEN
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            PTR=DOWN(PTR)
        ELSE IF (NODTYP.EQ.104) THEN
            CALL YITEM(PTR,TKDESC)
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            PTR=NEXT(PTR)
        ELSE
C type = dospec
            CALL XYDOSP(PTR,TKDESC)
            PTR=UP(PTR)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            IF (PTR.EQ.NODE) RETURN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            PTR=NEXT(PTR)
        END IF
        GO TO 100
 
        END
C ----------------------------------------------------------------------
C
C       X Y D A T O   -   Called by XYDATA (via YLIST)
C
 
        SUBROUTINE XYDATO(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        IF (NTYPE(NODE).EQ.45) THEN
            CALL YLEAF(DOWN(NODE),TKDESC)
            CALL ZTOKWR(TSTAR,0,DUMMY,TKDESC)
            CALL YEXPR(NEXT(DOWN(NODE)),TKDESC)
        ELSE
            CALL YEXPR(NODE,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y A S S I   -   Output an ASSIGN statement
C
 
        SUBROUTINE XYASSI(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TASSIG,0,DUMMY,TKDESC)
        CALL YLEAF(NODE,TKDESC)
        CALL ZTOKWR(TTO,0,DUMMY,TKDESC)
        CALL YLEAF(NEXT(NODE),TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y S F   -   Output a statement function
C
 
        SUBROUTINE XYSF(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLIST,YLEAF,YEXPR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL YLEAF(NODE,TKDESC)
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        CALL YLIST(YLEAF,DOWN(NEXT(NODE)),TKDESC)
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        CALL ZTOKWR(TEQUAL,0,DUMMY,TKDESC)
        CALL YEXPR(NEXT(NEXT(NODE)),TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y C M G O   -   Output a computed GOTO
C
 
        SUBROUTINE XYCMGO(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER DUMMY(2)
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL YLIST,YLEAF,YEXPR,ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TGOTO,0,DUMMY,TKDESC)
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        CALL YLIST(YLEAF,DOWN(NODE),TKDESC)
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        CALL YEXPR(NEXT(NODE),TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y A S G O   -   Output an assigned GOTO
C
 
        SUBROUTINE XYASGO(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
        INTEGER DUMMY(2),PTR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        SAVE DUMMY
 
        EXTERNAL YLIST,YLEAF,ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TGOTO,0,DUMMY,TKDESC)
        CALL YLEAF(NODE,TKDESC)
        PTR=NEXT(NODE)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            CALL YLIST(YLEAF,DOWN(PTR),TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y I F   -   Handles all IF/ELSEIF statements except logical IF
C
 
        SUBROUTINE XYIF(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2),NODTYP
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLEAF,YLIST
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        NODTYP=NTYPE(UP(NODE))
        IF (NODTYP.EQ.58) THEN
            CALL ZTOKWR(TELSIF,0,DUMMY,TKDESC)
        ELSE
            CALL ZTOKWR(TIF,0,DUMMY,TKDESC)
        END IF
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        CALL YEXPR(NODE,TKDESC)
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        IF (NODTYP.EQ.55) THEN
            CALL YLIST(YLEAF,NEXT(NODE),TKDESC)
        ELSE
            CALL ZTOKWR(TTHEN,0,DUMMY,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y W R I T  -  Output a WRITE statement
C
 
        SUBROUTINE XYWRIT(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER PTR,DUMMY(2)
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLIST,XYCII
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TWRITE,0,DUMMY,TKDESC)
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        PTR=NODE
        IF (NTYPE(PTR).EQ.122) THEN
            CALL YEXPR(DOWN(PTR),TKDESC)
        ELSE
            CALL YLIST(XYCII,DOWN(PTR),TKDESC)
        END IF
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        PTR=NEXT(NODE)
        IF (PTR.NE.0) CALL XYIOL(PTR,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y P R I N   -   Output a PRINT statement
C
 
        SUBROUTINE XYPRIN(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2),PTR
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TPRINT,0,DUMMY,TKDESC)
        CALL YEXPR(DOWN(NODE),TKDESC)
        PTR=NEXT(NODE)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            CALL XYIOL(PTR,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y A U X   -   Output an auxiliary i/o statement
C
 
        SUBROUTINE XYAUX(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2),NODTYP,TOKTYP
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLIST,XYCII,ERROR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        NODTYP=NTYPE(UP(NODE))
        IF (NODTYP.EQ.75) THEN
            TOKTYP=TBACKS
        ELSE IF (NODTYP.EQ.76) THEN
            TOKTYP=TENDFI
        ELSE IF (NODTYP.EQ.77) THEN
            TOKTYP=TREWIN
        ELSE IF (NODTYP.EQ.72) THEN
            TOKTYP=TOPEN
        ELSE IF (NODTYP.EQ.73) THEN
            TOKTYP=TCLOSE
        ELSE IF (NODTYP.EQ.74) THEN
            TOKTYP=TINQUI
        ELSE
            CALL ERROR('Invalid call to XYAUX')
        END IF
        CALL ZTOKWR(TOKTYP,0,DUMMY,TKDESC)
        IF (NTYPE(NODE).EQ.122) THEN
            CALL YEXPR(DOWN(NODE),TKDESC)
        ELSE
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            CALL YLIST(XYCII,DOWN(NODE),TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y R E A D   -   Output a READ statement
C
 
        SUBROUTINE XYREAD(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2)
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLIST,XYCII
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TREAD,0,DUMMY,TKDESC)
        IF (NTYPE(NODE).EQ.124) THEN
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            CALL YEXPR(DOWN(NODE),TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        ELSE
            IF (NTYPE(NODE).EQ.123) THEN
                CALL YEXPR(DOWN(NODE),TKDESC)
                IF (NEXT(NODE).NE.0)
     +              CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            ELSE
                CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
                CALL YLIST(XYCII,DOWN(NODE),TKDESC)
                CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            END IF
            IF (NEXT(NODE).NE.0)
     +          CALL XYIOL(NEXT(NODE),TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y I O L   -   Output an i/o list
C
 
        SUBROUTINE XYIOL(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2),PTR,NODTYP,NEXTX,ENDNOD
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        ENDNOD=UP(NODE)
        PTR=NODE
 
 100    NODTYP=NTYPE(PTR)
        IF (NODTYP.EQ.71) THEN
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            PTR=DOWN(PTR)
            GOTO 100
        ELSE IF (NODTYP.EQ.48) THEN
            CALL XYDOSP(PTR,TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
            PTR=UP(PTR)
        ELSE
            CALL YEXPR(PTR,TKDESC)
        END IF
 
 200    IF (PTR.EQ.ENDNOD) RETURN
        NEXTX=NEXT(PTR)
        IF (NEXTX.NE.0) THEN
            CALL ZTOKWR(TCOMMA,0,DUMMY,TKDESC)
            PTR=NEXTX
            GO TO 100
        END IF
        PTR=UP(PTR)
        GO TO 200
 
        END
C ----------------------------------------------------------------------
C
C       X Y C I I   -   Output a control_info_list item
C
 
        SUBROUTINE XYCII(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2),FMTTXT(4),NODTYP,PTR
 
        SAVE DUMMY,FMTTXT
 
        EXTERNAL ZTOKWR
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/,FMTTXT/70,77,84,129/
 
        NODTYP=NTYPE(NODE)
        IF (NODTYP.EQ.122) THEN
            PTR=DOWN(NODE)
        ELSE IF (NODTYP.EQ.123) THEN
            CALL ZTOKWR(TFMTKD,3,FMTTXT,TKDESC)
            CALL ZTOKWR(TEQUAL,0,DUMMY,TKDESC)
            PTR=DOWN(NODE)
        ELSE
            CALL YLEAF(DOWN(NODE),TKDESC)
            CALL ZTOKWR(TEQUAL,0,DUMMY,TKDESC)
            PTR=NEXT(DOWN(NODE))
        END IF
        CALL YEXPR(PTR,TKDESC)
 
        END
C ----------------------------------------------------------------------
C
C       X Y S U B R    -   Output a SUBROUTINE statement
C
 
        SUBROUTINE XYSUBR(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2),PTR
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLIST,YLEAF
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        CALL ZTOKWR(TSUBRO,0,DUMMY,TKDESC)
        CALL YLEAF(NODE,TKDESC)
        PTR=NEXT(NODE)
        IF (PTR.NE.0) THEN
            CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
            CALL YLIST(YLEAF,DOWN(PTR),TKDESC)
            CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
        END IF
 
        END
C ----------------------------------------------------------------------
C
C       X Y F U N C    -   Output a FUNCTION statement
C
 
        SUBROUTINE XYFUNC(NODE,TKDESC)
        INTEGER NODE,TKDESC
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C  TKLAST = LAST TOKEN NUMBER
C
      INTEGER TZEOF ,TASSIG,TBACKS,TBLOCK,TCALL ,TCLOSE,TCOMMO,TCONTI,
     +        TDATA ,TDO   ,TDIMEN,TELSE ,TELSIF,TEND  ,TENDFI,TENDIF,
     +        TENTRY,TEQUIV,TEXTER,TFUNCT,TFORMA,TGOTO ,TIF   ,TIMPLI,
     +        TINQUI,TINTRI,TOPEN ,TPARAM,TPAUSE,TPRINT,TPROGR,TREAD ,
     +        TRETUR,TREWIN,TSAVE ,TSTOP ,TSUBRO,TTHEN ,TTO   ,TWRITE,
     +        TINTEG,TREAL ,TDOUBL,TCOMPL,TLOGIC,TCHARA,TDCMPL,TCOMMA,
     +        TEQUAL,TCOLON,TLPARN,TRPARN,TLE   ,TLT   ,TEQ   ,TNE   ,
     +        TGE   ,TGT   ,TAND  ,TOR   ,TEQV  ,TNEQV ,TNOT  ,TSTAR ,
     +        TDSTAR,TPLUS ,TMINUS,TSLASH,TCNCAT,TDCNST,TLCNST,TRCNST,
     +        TPCNST,TCCNST,THCNST,TNAME ,TFIELD,TSCALE,TZEOS ,TCMMNT,
     +        TFMTKD,TENDKD,TERRKD,TKLAST
      PARAMETER (TZEOF = 1,TASSIG= 2,TBACKS= 3,TBLOCK= 4,TCALL = 5,
     +           TCLOSE= 6,TCOMMO= 7,TCONTI= 8,TDATA = 9,TDO   =10,
     +           TDIMEN=11,TELSE =12,TELSIF=13,TEND  =14,TENDFI=15,
     +           TENDIF=16,TENTRY=17,TEQUIV=18,TEXTER=19,TFUNCT=20,
     +           TFORMA=21,TGOTO =22,TIF   =23,TIMPLI=24,TINQUI=25,
     +           TINTRI=26,TOPEN =27,TPARAM=28,TPAUSE=29,TPRINT=30,
     +           TPROGR=31,TREAD =32,TRETUR=33,TREWIN=34,TSAVE =35,
     +           TSTOP =36,TSUBRO=37,TTHEN =38,TTO   =39,TWRITE=40,
     +           TINTEG=41,TREAL =42,TDOUBL=43,TCOMPL=44,TLOGIC=45,
     +           TCHARA=46,TDCMPL=47,TCOMMA=48,TEQUAL=49,TCOLON=50,
     +           TLPARN=51,TRPARN=52,TLE   =53,TLT   =54,TEQ   =55,
     +           TNE   =56,TGE   =57,TGT   =58,TAND  =59,TOR   =60,
     +           TEQV  =61,TNEQV =62,TNOT  =63,TSTAR =64,TDSTAR=65,
     +           TPLUS =66,TMINUS=67,TSLASH=68,TCNCAT=69,TDCNST=70,
     +           TLCNST=71,TRCNST=72,TPCNST=73,TCCNST=74,THCNST=75,
     +           TNAME =76,TFIELD=77,TSCALE=78,TZEOS =79,TCMMNT=80,
     +           TFMTKD=81,TENDKD=82,TERRKD=83,TKLAST=83)
 
 
        INTEGER DUMMY(2),PTR
 
        SAVE DUMMY
 
        EXTERNAL ZTOKWR,YLIST,YLEAF
 
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
C
C Common block and access functions for YP parse tree
C
C---------------------------------------------------------
C    TOOLPACK/1    Release: 2.5
C---------------------------------------------------------
        COMMON/XCTREE/ROOT,TREE,TRETOP
        INTEGER ROOT,TREE(4,46339),TRETOP
 
        SAVE /XCTREE/
C Use "JABC12" to try to avoid conflicts with ordinary variables
        INTEGER NEXT,PREV,UP,DOWN,NATTR,NTYPE,JABC12
 
        NEXT(JABC12)=MOD(TREE(3,JABC12),46340)
        PREV(JABC12)=(TREE(3,JABC12)/46340)
        UP(JABC12)=(TREE(1,JABC12)/46340)
        DOWN(JABC12)=TREE(2,JABC12)
        NTYPE(JABC12)=MOD(TREE(1,JABC12),46340)
        NATTR(JABC12)=TREE(4,JABC12)
 
        DATA DUMMY(1)/129/
 
        IF (NTYPE(NODE).NE.108) THEN
            CALL YTYPE(NODE,TKDESC)
            PTR=NEXT(NODE)
        ELSE
            PTR=NODE
        END IF
        CALL ZTOKWR(TFUNCT,0,DUMMY,TKDESC)
        CALL YLEAF(PTR,TKDESC)
        PTR=DOWN(NEXT(PTR))
        CALL ZTOKWR(TLPARN,0,DUMMY,TKDESC)
        IF (PTR.NE.0) CALL YLIST(YLEAF,PTR,TKDESC)
        CALL ZTOKWR(TRPARN,0,DUMMY,TKDESC)
 
        END
